From 02826c094ea22d36a4eba5b77e4c371b4c329c5b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 5 Dec 2006 02:37:31 +0000 Subject: [PATCH] * silly script to dump lag time for each database --- maintenance/getLagTimes.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 maintenance/getLagTimes.php diff --git a/maintenance/getLagTimes.php b/maintenance/getLagTimes.php new file mode 100644 index 0000000000..827bc49e1f --- /dev/null +++ b/maintenance/getLagTimes.php @@ -0,0 +1,22 @@ +getLagTimes(); + foreach( $lags as $n => $lag ) { + $host = $wgDBservers[$n]["host"]; + if( IP::isValid( $host ) ) { + $ip = $host; + $host = gethostbyaddr( $host ); + } else { + $ip = gethostbyname( $host ); + } + printf( "%10s %20s %3d\n", $ip, $host, $lag ); + } +} + +?> \ No newline at end of file -- 2.20.1